package org.obm.lmtp.backend;

import java.util.LinkedList;
import java.util.List;

public class LmtpEnvelope {

	private List<LmtpAddress> mRecipients;
	private LmtpAddress sender;

	public LmtpEnvelope() {
		mRecipients = new LinkedList<LmtpAddress>();
	}

	public boolean hasSender() {
		return sender != null;
	}

	public boolean hasRecipients() {
		return mRecipients.size() > 0;
	}

	public void setSender(LmtpAddress sender) {
		this.sender = sender;
	}

	public void addRecipient(LmtpAddress recipient) {
		mRecipients.add(recipient);
	}

	public List<LmtpAddress> getRecipients() {
		return mRecipients;
	}

	public LmtpAddress getSender() {
		return sender;
	}

}